package cn.bdqn.springboottemplate.controller;

import cn.bdqn.springboottemplate.entity.User1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Autowired
    User1 user1;

    @Value("${books[0].phone}")
    private String phone;

    @GetMapping("/hello")
    public String hello(){
        System.out.println(user1);

        return "phone"+phone;
    }
}
